home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / src / For Metrowerks Users / mpwtool-exit-4i-20.txt < prev    next >
Text File  |  1995-06-27  |  2KB  |  80 lines

  1. # Run this file through PatchData to fix the problem with exit in
  2. # "MPW ANSI (4i) C.68k.Lib" (CW6).
  3.  
  4. # file: 'CW6 Gold:Apple Development Products:Fully Configured MPW:Libraries:MW68Klibraries:MPW ANSI (4i) C.68K.Lib'
  5. # created:  1995.04.20 17:44:48
  6. # modified: 1995.04.20 18:34:47
  7.  
  8. # Check that we are patching the right file.
  9. size 1811E;
  10. crc 4CCE20B4;
  11.  
  12. # Change the length of the last object file.
  13. offset E3E;
  14. change 2DFE;
  15. to     2E14;
  16.  
  17. # Change _exit to clear the high byte of its argument.
  18. offset 17CC;
  19. change 2F2F 0004 4EB9;
  20. to     422F 0004 4EF9;
  21.  
  22. # Change _exit to call _RTExit instead of __cleanupandexit__.
  23. offset 18A7;
  24. change 02 DF 5F 5F 63 6C 65 61 6E 75;
  25. to     03 E1 5F 52 54 45 78 69 74 00;
  26.  
  27. # Change _mpwexit to do nothing.
  28. offset 160AE;
  29. change 4E56;
  30. to     4E75;
  31.  
  32. # Change _RTExit to call __cleanupandexit__ after the finalization functions.
  33. offset 160CE;
  34. change 4581 0000 002B 0001 0000 0012 0000 0000
  35.        456A 0000 002B 0000 0062 8000 0000 0000
  36.        0000 4E56 0000 2F0C 206D 0016 49E8 008C
  37.        600A 4A94 6704 2054 4E90 594C 206D 0016
  38.        B1CC 65EE 4AAD 0024 670A 206D 0024 216E
  39.        0008 000E 4AAD 0018 660A 206D 0016 2250
  40.        4E91 600E 7001 2F00 486D 0000 4EAD 0000
  41.        504F 286E FFFC 4E5E 4E75 875F 5254 4578
  42.        6974;
  43. to     456A 0000 002B 0000 0062 8000 0000 0000
  44.        0000 4E56 0000 2F0C 206D 0016 49E8 008C
  45.        600A 4A94 6704 2054 4E90 594C 206D 0016
  46.        B1CC 65EE 4EB9 0000 0000 4AAD 0024 670A
  47.        206D 0024 216E 0008 000E 4AAD 0018 660A
  48.        206D 0016 2250 4E91 600E 7001 2F00 486D
  49.        0000 4EAD 0000 504F 286E FFFC 4E5E 4E75
  50.        815F 0000 4575 0000 0058 0001 0000 0024
  51.        0000;
  52.  
  53. # Change the relocations that have moved in _RTExit
  54. offset 1615C;
  55. change 003A;
  56. to     0040;
  57. offset 1616C;
  58. change 0024;
  59. to     0030;
  60. offset 1618C;
  61. change 0048;
  62. to     004E;
  63. offset 16194;
  64. change 0034;
  65. to     003A;
  66. offset 161A4;
  67. change 004C;
  68. to     0052;
  69.  
  70. # Add __cleanupandexit__ to the list of symbols (for _RTExit).
  71. offset 15332;
  72. change 0058;
  73. to     0059;
  74. offset 1811E;  # end of file
  75. append 02DF 5F5F 636C 6561 6E75 7061 6E64 6578 6974 5F5F 0000;
  76.  
  77. # Check the result of this patch.
  78. size 18134;
  79. crc 7A4CADCF;
  80.